300 |
How do I change the cell's background color
|
299 |
How do I change the caption or value for a particular cell
|
298 |
How do I get the handle of the cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("CellBold",,oItems:ItemCell(h,0),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
297 |
How do I retrieve the focused item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:FocusItem(),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
296 |
How do I get the number or count of child items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:AddItem(oItems:ChildCount(h)) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
295 |
How do I enumerate the visible items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:AddItem("Root 2") oItems:SetProperty("ItemBold",oItems:FirstVisibleItem(),.T.) oItems:SetProperty("ItemBold",oItems:NextVisibleItem(oItems:FirstVisibleItem()),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
294 |
How do I enumerate the siblings items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:AddItem("Root 2") oItems:SetProperty("ItemBold",oItems:NextSiblingItem(oItems:FirstVisibleItem()),.T.) oItems:SetProperty("ItemBold",oItems:PrevSiblingItem(oItems:NextSiblingItem(oItems:FirstVisibleItem())),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
293 |
How do I get the parent item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:ItemParent(oItems:ItemChild(h)),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
292 |
How do I get the first child item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:ItemChild(h),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
291 |
How do I enumerate the root items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:AddItem("Root 2") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ItemBold",oItems:RootItem(0),.T.) oItems:SetProperty("ItemUnderline",oItems:RootItem(1),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
290 |
I have a hierarchy, how can I count the number of root items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:AddItem("Root 2") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:AddItem(oItems:RootCount()) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
289 |
How can I make an item unselectable, or not selectable
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Column") oItems := oGrid:Items() h := oItems:AddItem("unselectable - you can't get selected") oItems:SetProperty("SelectableItem",h,.F.) oItems:AddItem("selectable") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
288 |
How can I hide or show an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Column") oItems := oGrid:Items() h := oItems:AddItem("hidden") oItems:SetProperty("ItemHeight",h,0) oItems:SetProperty("SelectableItem",h,.F.) oItems:AddItem("visible") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
287 |
How can I change the height for all items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:DefaultItemHeight := 32 oGrid:Columns():Add("Column") oGrid:Items():AddItem("One") oGrid:Items():AddItem("Two") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
286 |
How do I change the height of an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:ScrollBySingleLine := .T. oGrid:Columns():Add("Default") oItems := oGrid:Items() oItems:SetProperty("ItemHeight",oItems:AddItem("height"),128) oGrid:Items():AddItem("enabled") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
285 |
How do I disable or enable an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() oItems:SetProperty("EnableItem",oItems:AddItem("disabled"),.F.) oGrid:Items():AddItem("enabled") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
284 |
How do I display as strikeout a cell
|
283 |
How do I display as strikeout a cell or an item
|
282 |
How do I display as strikeout an item
|
281 |
How do I underline a cell
|
280 |
How do I underline a cell or an item
|
279 |
How do I underline an item
|
278 |
How do I display as italic a cell
|
277 |
How do I display as italic a cell or an item
|
276 |
How do I display as italic an item
|
275 |
How do I bold a cell
|
274 |
How do I bold a cell or an item
|
273 |
How do I bold an item
|
272 |
How do I change the foreground color for the item
|
271 |
How do I change the visual appearance for the item, using your EBN technology
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h,hC oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root") hC := oItems:InsertItem(h,,"Child 1") oItems:SetProperty("ItemBackColor",hC,0x1000000) oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
270 |
How do I change the background color for the item
|
269 |
How do I expand or collapse an item
|
268 |
How do I associate an extra data to an item
|
267 |
How do I get the number or count of items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems,oItems1 LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems1 := oGrid:Items() oItems1:AddItem(oItems1:ItemCount()) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
266 |
How can I specify the width of the ActiveX control, when using the InsertControlItem property
|
265 |
How can I put the ActiveX control in a different column, when using the InsertControlItem property
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:ScrollBySingleLine := .F. oGrid:DrawGridLines := -1/*exAllLines*/ oGrid:Columns():Add("C1") oGrid:Columns():Add("C2") oGrid:Columns():Add("C3") oItems := oGrid:Items() h := oItems:InsertControlItem(,"MSCAL.Calendar") oItems:SetProperty("CellValue",h,0,"This is a bit of text that is shown in the first column") oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/) oItems:SetProperty("ItemWidth",h,-32001) oItems:SetProperty("CellValue",h,2,"This is a bit of text that is shown in the third column") oItems:SetProperty("CellSingleLine",h,2,0/*exCaptionWordWrap*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
264 |
Is there any function I can use to get the program or the control identifier I've been using when called the InsertControlItem
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oGrid:ScrollBySingleLine := .F. oGrid:LinesAtRoot := -1/*exLinesAtRoot*/ oItems := oGrid:Items() h := oItems:InsertControlItem(,"MSCAL.Calendar") oItems:InsertItem(h,,oItems:ItemControlID(h)) oItems:SetProperty("ExpandItem",h,.T.) h := oItems:InsertControlItem(,"MSChart20Lib.MSChart") oItems:SetProperty("ItemAppearance",h,4/*Etched*/) oItems:InsertItem(h,,oItems:ItemControlID(h)) oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
263 |
How can I change the height of newly created ActiveX control, using the InsertControlItem
|
262 |
How can I change the border for newly created ActiveX control, using the InsertControlItem
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oGrid:ScrollBySingleLine := .F. oItems := oGrid:Items() oItems:SetProperty("ItemAppearance",oItems:InsertControlItem(,"MSCAL.Calendar"),2/*Sunken*/) oItems:SetProperty("ItemAppearance",oItems:InsertControlItem(,"MSChart20Lib.MSChart"),4/*Etched*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
261 |
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oCalendar LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root") oCalendar := oItems:ItemObject(oItems:InsertControlItem(h,"MSCAL.Calendar")) oCalendar:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oCalendar:GridCellEffect := 0 oCalendar:ShowTitle := .F. oCalendar:ShowDateSelectors := .F. oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
260 |
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oCalendar LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root") oCalendar := oItems:ItemObject(oItems:InsertControlItem(h,"MSCAL.Calendar")) oCalendar:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
259 |
How can I insert an ActiveX control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root") oItems:InsertControlItem(h,"MSCAL.Calendar") oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
258 |
How can I change at runtime the parent of the item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL hC,hP oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:LinesAtRoot := -1/*exLinesAtRoot*/ oGrid:Columns():Add("Default") oItems := oGrid:Items() hP := oItems:AddItem("Root") hC := oItems:AddItem("Child") oItems:SetParent(hC,hP) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
257 |
How can I sort the items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oGrid:Columns:Item("Default"):SortOrder := 2/*SortDescending*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
256 |
How do I sort the child items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oItems := oGrid:Items() h := oItems:AddItem("Root") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SortChildren(h,0,.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
255 |
How can I ensure or scroll the control so the item fits the control's client area
|
254 |
How can I remove or delete all items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") oGrid:Items():AddItem("removed item") oGrid:Items():RemoveAllItems() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
253 |
How can I remove or delete an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Default") h := oGrid:Items:AddItem("removed item") oGrid:Items():RemoveItem(h) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
252 |
How can I add or insert child items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:LinesAtRoot := -1/*exLinesAtRoot*/ oGrid:Columns():Add("C1") oGrid:Columns():Add("C2") oItems := oGrid:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellValue",h,1,"Cell 2") oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Cell 3"),1,"Cell 4") oItems:SetProperty("CellValue",oItems:InsertItem(h,,"Cell 5"),1,"Cell 6") oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
251 |
How can I add or insert a child item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:LinesAtRoot := -1/*exLinesAtRoot*/ oGrid:Columns():Add("Default") oItems := oGrid:Items() oItems:InsertItem(oItems:AddItem("root"),,"child") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
250 |
How can I add or insert an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("C1") oGrid:Columns():Add("C2") oItems := oGrid:Items() oItems:SetProperty("CellValue",oItems:AddItem("Cell 1"),1,"Cell 2") h := oItems:AddItem("Cell 3") oItems:SetProperty("CellValue",h,1,"Cell 4") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
249 |
How can I add or insert an item
|
248 |
How can I get the columns as they are shown in the control's sortbar
|
247 |
How can I access the properties of a column
|
246 |
How can I remove all the columns
|
245 |
How can I remove a column
|
244 |
How can I get the number or the count of columns
|
243 |
How can I change the font for all cells in the entire column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oConditionalFormat LOCAL f oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) f := CreateObject("StdFont") f:Name := "Tahoma" f:Size := 12 oConditionalFormat := oGrid:ConditionalFormats():Add("1") oConditionalFormat:Font := f oConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oGrid:Columns():Add("Column") oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
242 |
How can I change the background color for all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_ConditionalFormat oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_ConditionalFormat := oGrid:ConditionalFormats:Add("1") var_ConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oGrid:Columns():Add("Column") oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
241 |
How can I change the foreground color for all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_ConditionalFormat oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_ConditionalFormat := oGrid:ConditionalFormats:Add("1") var_ConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oGrid:Columns():Add("Column") oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
240 |
How can I show as strikeout all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_ConditionalFormat oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_ConditionalFormat := oGrid:ConditionalFormats:Add("1") var_ConditionalFormat:StrikeOut := .T. var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oGrid:Columns():Add("Column") oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
239 |
How can I underline all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_ConditionalFormat oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_ConditionalFormat := oGrid:ConditionalFormats:Add("1") var_ConditionalFormat:Underline := .T. var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oGrid:Columns():Add("Column") oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
238 |
How can I show in italic all data in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_ConditionalFormat oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_ConditionalFormat := oGrid:ConditionalFormats:Add("1") var_ConditionalFormat:Italic := .T. var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oGrid:Columns():Add("Column") oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
237 |
How can I bold the entire column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_ConditionalFormat oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_ConditionalFormat := oGrid:ConditionalFormats:Add("1") var_ConditionalFormat:Bold := .T. var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oGrid:Columns():Add("Column") oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
236 |
How can I display a computed column and highlight some values that are negative or less than a value
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_ConditionalFormat LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("A") oGrid:Columns():Add("B") oGrid:Columns():Add("(A+B)*1.19"):ComputedField := "(dbl(%0) + dbl(%1)) * 1.19" oItems := oGrid:Items() oItems:SetProperty("CellValue",oItems:AddItem(1),1,2) oItems1 := oGrid:Items() oItems1:SetProperty("CellValue",oItems1:AddItem(10),1,20) var_ConditionalFormat := oGrid:ConditionalFormats:Add("dbl(%2) > 10") var_ConditionalFormat:Bold := .T. var_ConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) var_ConditionalFormat:ApplyTo := 2/*0x2+*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
235 |
Can I display a computed column so it displays the VAT, or SUM
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("A") oGrid:Columns():Add("B") oGrid:Columns():Add("(A+B)*1.19"):ComputedField := "(dbl(%0) + dbl(%1)) * 1.19" oItems := oGrid:Items() oItems:SetProperty("CellValue",oItems:AddItem(1),1,2) oItems1 := oGrid:Items() oItems1:SetProperty("CellValue",oItems1:AddItem(10),1,20) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
234 |
How can I show a column that adds values in the cells
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("A") oGrid:Columns():Add("B") oGrid:Columns():Add("A+B"):ComputedField := "dbl(%0) + dbl(%1)" oItems := oGrid:Items() oItems:SetProperty("CellValue",oItems:AddItem(1),1,2) oItems1 := oGrid:Items() oItems1:SetProperty("CellValue",oItems1:AddItem(10),1,20) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
233 |
Is there any function to filter the control's data as I type, so the items being displayed include the typed characters
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Column oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Column := oGrid:Columns:Add("Filter") var_Column:FilterOnType := .T. var_Column:DisplayFilterButton := .T. var_Column:AutoSearch := 1/*exContains*/ oGrid:Items():AddItem("Canada") oGrid:Items():AddItem("USA") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
232 |
Is there any function to filter the control's data as I type, something like filter on type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Column oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Column := oGrid:Columns:Add("Filter") var_Column:FilterOnType := .T. var_Column:DisplayFilterButton := .T. oGrid:Items():AddItem("Canada") oGrid:Items():AddItem("USA") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
231 |
How can I programmatically filter a column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oColumn := oGrid:Columns():Add("Filter") oColumn:DisplayFilterButton := .T. oColumn:FilterType := 2/*exNonBlanks*/ oGrid:Items():AddItem() oGrid:Items():AddItem("not empty") oGrid:ApplyFilter() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
230 |
How can I show or display the control's filter
|
229 |
How can I customize the items being displayed in the drop down filter window
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oColumn := oGrid:Columns():Add("Custom Filter") oColumn:DisplayFilterButton := .T. oColumn:DisplayFilterPattern := .F. oColumn:CustomFilter := "Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||Text Documents (*.log,*.txt)||*.txt|*.log" oColumn:FilterType := 3/*exPattern*/ oColumn:Filter := "*.xls" oGrid:Items():AddItem("excel.xls") oGrid:Items():AddItem("word.doc") oGrid:Items():AddItem("pp.pps") oGrid:Items():AddItem("text.txt") oGrid:ApplyFilter() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
228 |
How can I change the order or the position of the columns in the sort bar
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:SortBarVisible := .T. oGrid:SortBarColumnWidth := 48 oGrid:Columns():Add("C1"):SortOrder := 1/*SortAscending*/ oGrid:Columns():Add("C2"):SortOrder := 2/*SortDescending*/ oGrid:Columns:Item("C2"):SortPosition := 0 oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
227 |
How do I arrange my columns on multiple levels
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("S"):Width := 32 oGrid:Columns():Add("Level 2"):LevelKey := 1 oGrid:Columns():Add("Level 3"):LevelKey := 1 oGrid:Columns():Add("Level 4"):LevelKey := 1 oGrid:Columns():Add("Level 1"):LevelKey := "2" oGrid:Columns():Add("Level 2"):LevelKey := "2" oGrid:Columns():Add("Level 3"):LevelKey := "2" oGrid:Columns():Add("Level 4"):LevelKey := "2" oGrid:Columns():Add("E"):Width := 32 oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
226 |
How do I arrange my columns on multiple lines
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:HeaderHeight := 32 oGrid:Columns():Add(""):HTMLCaption := "Line 1<br>Line 2" oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
225 |
How can I display all cells using HTML format
|
224 |
How can I display all cells using multiple lines
|
223 |
How do change the vertical alignment for all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("MultipleLine"):SetProperty("Def",16/*exCellSingleLine*/,.F.) oGrid:Columns():Add("VAlign"):SetProperty("Def",6/*exCellVAlignment*/,2) oItems := oGrid:Items() oItems:SetProperty("CellValue",oItems:AddItem("This is a bit of long text that should break the line"),1,"bottom") oItems1 := oGrid:Items() oItems1:SetProperty("CellValue",oItems1:AddItem("This is a bit of long text that should break the line"),1,"bottom") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
222 |
How do change the foreground color for all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("ForeColor"):SetProperty("Def",5/*exCellForeColor*/,255) oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
221 |
How do change the background color for all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("BackColor"):SetProperty("Def",4/*exCellBackColor*/,255) oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
220 |
How do I show buttons for all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oColumn := oGrid:Columns():Add("Button") oColumn:SetProperty("Def",2/*exCellHasButton*/,.T.) oColumn:SetProperty("Def",3/*exCellButtonAutoWidth*/,.T.) oGrid:Items():AddItem(" Button 1 ") oGrid:Items():AddItem(" Button 2 ") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
219 |
How do I show buttons for all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Button"):SetProperty("Def",2/*exCellHasButton*/,.T.) oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
218 |
How do I display radio buttons for all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Radio"):SetProperty("Def",1/*exCellHasRadioButton*/,.T.) oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
217 |
How do I display checkboxes for all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Check"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.) oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
216 |
How can I display a tooltip when the cursor hovers the column
|
215 |
Is there any function to assign a key to a column instead using its name or capion
|
214 |
Is there any function to assign any extra data to a column
|
213 |
By default, the column gets sorted descending, when I first click its header. How can I change so the column gets sorted ascending when the user first clicks the column's header
|
212 |
How can I specify the maximum width for the column, if I use WidthAutoResize property
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oColumn := oGrid:Columns():Add("Auto") oColumn:WidthAutoResize := .T. oColumn:MinWidthAutoResize := 32 oColumn:MaxWidthAutoResize := 128 oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
211 |
How can I specify the minimum width for the column, if I use WidthAutoResize property
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oColumn := oGrid:Columns():Add("Auto") oColumn:WidthAutoResize := .T. oColumn:MinWidthAutoResize := 32 oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
210 |
Is there any option to resize the column based on its data, captions
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("A"):WidthAutoResize := .T. oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
209 |
How can I align the icon in the column's header in the center
|
208 |
How do I align the icon in the column's header to the right
|
207 |
How do I show or hide the sorting icons, but still need sorting
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Sorted"):SortOrder := 1/*SortAscending*/ oGrid:Columns:Item(0):DisplaySortIcon := .F. oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
206 |
How do I enable or disable the entire column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("C1") oGrid:Columns():Add("Disabled"):Enabled := .F. oItems := oGrid:Items() oItems:SetProperty("CellValue",oItems:AddItem(0),1,"0.1") oItems1 := oGrid:Items() oItems1:SetProperty("CellValue",oItems1:AddItem(1),1,"1.1") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
205 |
How do I disable drag and drop columns
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("C1"):AllowDragging := .F. oGrid:Columns():Add("C2"):AllowDragging := .F. oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
204 |
How do I disable resizing a column at runtime
|
203 |
How can I align the column to the right, and its caption too
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oColumn := oGrid:Columns():Add("Column") oColumn:Alignment := 2/*RightAlignment*/ oColumn:HeaderAlignment := 2/*RightAlignment*/ oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
202 |
How can I align the column to the right
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Column"):Alignment := 2/*RightAlignment*/ oGrid:Items():AddItem(0) oGrid:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
201 |
How do I change the column's caption
|